package com.bdqn.pojo;


import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.util.Date;

public class SysUser {
  private int id; //id
  @NotEmpty(message = "用户编码不能为空")
  private String account; //用户编码
  @NotEmpty(message = "用户名称不能为空")
  private String realName; //用户名称
  @NotNull(message = "密码不能为空")
  @Length(min = 6,message = "用户密码长度为6-10")
  private String password; //用户密码
  private int sex;  //性别
  @Past(message = "必须是一个过去的时间")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date birthday;  //出生日期
  private String phone;   //电话
  private String address; //地址
  private int roleId;    //用户角色ID
  private int createdUserId;   //创建者
  private String createdTime; //创建时间
  private int updatedUserId;     //更新者
  private Date updatedTime;   //更新时间
  private int age;//年龄
  private String roleName;
  private String idPicPath;   //存储上传的证据照片
  private String workPicPath;//工作证据照

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getAccount() {
    return account;
  }

  public void setAccount(String account) {
    this.account = account;
  }

  public String getRealName() {
    return realName;
  }

  public void setRealName(String realName) {
    this.realName = realName;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public int getSex() {
    return sex;
  }

  public void setSex(int sex) {
    this.sex = sex;
  }

  public Date getBirthday() {
    return birthday;
  }

  public void setBirthday(Date birthday) {
    this.birthday = birthday;
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public int getRoleId() {
    return roleId;
  }

  public void setRoleId(int roleId) {
    this.roleId = roleId;
  }

  public int getCreatedUserId() {
    return createdUserId;
  }

  public void setCreatedUserId(int createdUserId) {
    this.createdUserId = createdUserId;
  }

  public String getCreatedTime() {
    return createdTime;
  }

  public void setCreatedTime(String createdTime) {
    this.createdTime = createdTime;
  }

  public int getUpdatedUserId() {
    return updatedUserId;
  }

  public void setUpdatedUserId(int updatedUserId) {
    this.updatedUserId = updatedUserId;
  }

  public Date getUpdatedTime() {
    return updatedTime;
  }

  public void setUpdatedTime(Date updatedTime) {
    this.updatedTime = updatedTime;
  }

  public int getAge() {
    return age;
  }

  public void setAge(int age) {
    this.age = age;
  }

  public String getRoleName() {
    return roleName;
  }

  public void setRoleName(String roleName) {
    this.roleName = roleName;
  }

  public String getIdPicPath() {
    return idPicPath;
  }

  public void setIdPicPath(String idPicPath) {
    this.idPicPath = idPicPath;
  }

  public String getWorkPicPath() {
    return workPicPath;
  }

  public void setWorkPicPath(String workPicPath) {
    this.workPicPath = workPicPath;
  }
}
